import request from '@/utils/request'
import scope from './scope'
const apiPrefix = `${process.env.VUE_APP_BASE_API}/${scope}/tenant/`

// 租户管理
export const getTenant = (params, config = {}) => {
    return request.get(apiPrefix + params.id, { params: params, ...config })
}
export const getTenantListPage = (params, config = {}) => {
    return request.post(apiPrefix + 'page-list', params, config)
}
export const addTenant = (params, config = {}) => {
    return request.post(apiPrefix, params, config)
}
export const editTenant = (params, config = {}) => {
    return request.put(apiPrefix, params, config)
}
export const removeTenant = (params, config = {}) => {
    return request.delete(apiPrefix + 'soft/' + params.id, { params: params, ...config })
}
export const batchRemoveTenant = (params, config = {}) => {
    return request.delete(apiPrefix + 'ids', { data: params, ...config })
}
export const deleteTenant = (params, config = {}) => {
    return request.delete(apiPrefix + params.id, { params: params, ...config })
}